home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCMania 19
/
PCMania19.iso
/
Jogos em Flash
/
TABULEIRO
/
FLASHCHESSER.SWF
/
scripts
/
DefineButton2_21
/
BUTTONCONDACTION on(release).as
next >
Wrap
Text File
|
2002-05-07
|
2KB
|
69 lines
on(release){
if(1 < schaakstuk._currentframe && (_root.selectieStuk == 0 || _root.selectieStuk == this._name))
{
trace("if 1 passed");
if(schaakstuk._currentframe % 2 == 0 && _root.kleurBeurt % 2 == 0 || schaakstuk._currentframe % 2 != 0 && _root.kleurBeurt % 2 != 0)
{
trace("if 2 passed");
if(selectierand._alpha == 100)
{
setProperty(selectierand, _alpha, 0);
_root.selectieStuk = 0;
}
else
{
setProperty(selectierand, _alpha, 100);
_root.selectieStuk = this._name;
}
}
}
else
{
trace("else 1 passed");
if(_root.zetStuk(_root.selectieStuk,this._name) == true)
{
trace("zetstuk passed");
_root.stukVanVoor = eval("_root." + _root.selectieStuk + ".schaakstuk._currentframe");
_root.stukNaarVoor = schaakstuk._currentframe;
_root.tekst = eval("_root." + _root.selectieStuk + ".schaakstuk._currentframe");
tellTarget(schaakstuk)
{
gotoAndStop(eval("_root." + _root.selectieStuk + ".schaakstuk._currentframe"));
}
tellTarget(eval("_root." + _root.selectieStuk + ".schaakstuk"))
{
gotoAndStop(1);
}
if(_root.staIkSchaak(schaakstuk._currentframe % 2) == true)
{
trace("staat SCHAAK");
tellTarget(eval("_root." + _root.selectieStuk + ".schaakstuk"))
{
gotoAndStop(_root.stukVanVoor);
}
tellTarget(schaakstuk)
{
gotoAndStop(_root.stukNaarVoor);
}
}
else
{
tellTarget(eval("_root." + _root.selectieStuk + ".selectieRand"))
{
setProperty(selectierand, _alpha, 0);
}
_root.selectieStuk = 0;
_root.kleurBeurt = Math.round(schaakstuk._currentframe - 1);
if(_root.dekleur == "WHITE plays")
{
_root.dekleur = "BLACK plays";
}
else
{
_root.dekleur = "WHITE plays";
}
}
}
}
}